module.exports = {
    port: 3000,
    upload: {
        dir: 'disk1',
        url: '/res/upload/disk1'
    },
    authKeyWord: 'FrameControl',
    clusterWorkerNum: 1, //应用运行的进程数，1：开启单进程模式，0：开启多进程模式，进程数=CPU数量，>1:开启多进程模式，数量为设置数量。多进程模式下，需要Redis的支持
    isShareMemory: true, //是否使用共享内存，当是多进程模式时，isShareMemory=true，单进程模式时，可以为false或true
    isHttps: false,
    DB: {
        host: "127.0.0.1",
        port: "3307",
        user: "root",
        pwd: "123456",
        dbName: "base-frame",
        dialect: "mysql",
        dirName: "data-base",
        logging: false
    },
    redis: {
        port: 6379, // Redis port
        host: '127.0.0.1', // Redis host
        family: 4, // 4 (IPv4) or 6 (IPv6)
        password: '123456',
        db: 1,
        pool: {
            maxConnections: 2
        }
    },
    log4js: {
        appenders: {
            ruleConsole: {
                type: 'console'
            },
            // ruleFile: {
            //     type: 'dateFile',
            //     filename: './logs/server-',
            //     pattern: 'yyyy-MM-dd.log',
            //     maxLogSize: 10 * 1000 * 1000,
            //     numBackups: 3,
            //     alwaysIncludePattern: true
            // }

        },
        categories: {
            default: {
                appenders: ['ruleConsole'],
                level: 'all' //ALL<TRACE<DEBUG<INFO<WARN<ERROR<FATAL<MARK<OFF
            }
            // file: {
            //     appenders: ['ruleFile'],
            //     level: 'all'
            // }
        },
        replaceConsole: true,
        pm2: true
    },
    task:{
        host:'127.0.0.1',
        port:8000,
        webSocket:{
            bundle:true,//提供mqtt.js
            port:10002,
            static:'./'
        }
    }
};
